<template>
  <div class="search">
    <div class="tips">
      <img src="../assets/imgs/shouzhi.png" alt="" />
      <h2>请您搜索您想要的的歌曲</h2>
    </div>
    <div class="searchBox">
      <input
        @keyup.enter="$router.push('/list?inpName=' + inpName)"
        type="text"
        placeholder="请输入音乐"
        v-model="inpName"
      />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      inpName: ''
    }
  }
}
</script>

<style lang="less" scoped>
.search {
  padding: 80px 0;
  background-color: #f5f5f5;

  .tips {
    display: flex;
    align-items: center;
    width: 300px;
    margin: 0 auto;
    justify-content: center;
    img {
      width: 30px;
      height: 20px;
    }

    h2 {
      font-size: 20px;
      margin-left: 5px;
      color: #cdcdcd;
    }
  }
  .searchBox {
    text-align: center;
    width: 300px;
    margin: 20px auto;

    input {
      border: none;
      width: 185px;
      height: 30px;
      outline: none;
      text-indent: 1em;
      ::placeholder {
        color: #ccc;
      }
    }
  }
}
</style>
